-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Seekable from source handlers #2376
Conversation
dmlap
commented
Jul 17, 2015
- Defer to the source handler for seekable(). For Source handler questions and issues #2323
- Clamp seeks to seekable ranges in the Flash tech
Tests failed. Automated cross-browser testing via Sauce Labs and Travis CI shows that the JavaScript changes in this pull request are: BUSTED Commit: fbac569f083ab179380831ed48ee9421fe6f1f18 (Please note that this is a fully automated comment.) |
@dmlap are you just not running tests before submitting PRs or is there something else going on? |
Argh... ran the tests in the browser but forgot to check my other tab for jshint results. Clearly I am still adapting to the new workflow :/ Will update, sorry. |
fbac569
to
a5ef4bb
Compare
Tests failed. Automated cross-browser testing via Sauce Labs and Travis CI shows that the JavaScript changes in this pull request are: BUSTED Commit: a5ef4bb (Please note that this is a fully automated comment.) |
Why do we need to clamp seeks before it goes to the swf? Will that affect live at all, since seekable will be zero to whatever duration is for live? |
@@ -30,14 +31,17 @@ test('currentTime', function() { | |||
// Mock out a Flash instance to avoid creating the swf object | |||
let mockFlash = { | |||
el_: { | |||
vjs_setProperty: function(prop, val){ | |||
vjs_setProperty(prop, val){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait what? We can use this outside of classes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are shorthand for functions. They're different from the methods in classes. Notice how there's a comma between them but not in classes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see.
A few questions inline but looks good to me otherwise. |
This is another variation of the problem where the SWF has no concept of appropriate seek values for MSE-style content. Steps 6-8 of the seeking algorithm specify that seeks should be a non-erroring no-op if there are no seekable ranges for a video. The previous Flash behavior would always send the seek through to the SWF, which would always trigger a I didn't think of live RTMP when making this change. Are you familiar with how that is supposed to work? For most live HLS, seekable isn't actually [player.seekable().start(0), player.seekable().end(0)]; // [0, 120]
setTimeout(() => {
[player.seekable().start(0), player.seekable().end(0)]; // [200, 220]
}, 200 * 1000); |
Flash.seekable gets end(0) from Flash.duration(). I'm not totally clear on what we're supporting for live in Flash, for HLS or RTMP, but if duration is ever -1 or Infinity that seems like it would screw with the time clamping here. Assuming you can still seek in that case. |
According to the spec, duration should be Infinity for live streams which would definitely screw up the current default implementation of seekable. We could rethink live RTMP and get it aligned with the spec but we may want to consider deprecating the live use-case for 5.0. |
I think deprecating live RTMP for 5.0 is reasonable request. Would this issue affect live HLS? |
@heff yes, this change is to support live HLS properly. |
a5ef4bb
to
fdee8b9
Compare
@heff changed the tests to look more like the other Flash tests. Any other thoughts on this one? |
Tests failed. Automated cross-browser testing via Sauce Labs and Travis CI shows that the JavaScript changes in this pull request are: BUSTED Commit: fdee8b9e3bddf8063d1414d3f6e5692c113bd4b7 (Please note that this is a fully automated comment.) |
No, this looks good to me |
@pam retry |
Tests failed. Automated cross-browser testing via Sauce Labs and Travis CI shows that the JavaScript changes in this pull request are: BUSTED Commit: fdee8b9e3bddf8063d1414d3f6e5692c113bd4b7 (Please note that this is a fully automated comment.) |
Motion to ignore pam? |
+1 |
If seekable is defined on the active source handler, use that implementation instead of the standard one.
Bail early (and don't trigger any side-effects) if there are no seekable ranges when setting currentTime. Clamp seeks to the interval between the earliest start and latest end position.
fdee8b9
to
80db9d8
Compare
Tests passed. Automated cross-browser testing via Sauce Labs and Travis CI shows that the JavaScript changes in this pull request are: CONFIRMED Commit: 80db9d8 (Please note that this is a fully automated comment.) |